package com.peas.fastdfs.quartz;

import lombok.extern.slf4j.Slf4j;
import org.quartz.*;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@DisallowConcurrentExecution
public class TestQuartzTask3 implements Job {


    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("任务开始");


        JobDataMap mergedJobDataMap = context.getMergedJobDataMap();
        log.info(mergedJobDataMap.toString());
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        log.info("任务执行完毕");

    }
}
